﻿Public Class AddNumbers
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btn_Calculate_Click(sender As Object, e As EventArgs) Handles btn_Calculate.Click
        Dim result As Double
        result = addNumbers(CDbl(txt_NumberLeft.Text), CDbl(txt_NumberRight.Text))
        lbl_Result.Text = CStr(result)
    End Sub

    Private Function addNumbers(ByVal numberOne As Double, ByVal numberTwo As Double) As Double
        Return numberOne + numberTwo
    End Function
End Class